<%--
  Created by IntelliJ IDEA.
  User: 32696
  Date: 2025/10/24
  Time: 12:17
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>练习结果</title>
</head>
<body>
<h1>练习结果</h1>
<c:forEach items="${result.problems}" var="problem" varStatus="status">
    <p>
            ${status.index + 1}. ${problem.question}
        你的答案：${problem.userAnswer}，正确答案：${problem.correctAnswer}
        <c:if test="${problem.correct}">
            <span style="color: green;">√</span>
        </c:if>
        <c:if test="${!problem.correct}">
            <span style="color: red;">×</span>
        </c:if>
    </p>
</c:forEach>
<p>总题数：${result.totalCount}，正确：${result.correctCount}，正确率：${result.accuracy}%</p>
<a href="${pageContext.request.contextPath}/main">返回重新练习</a>
<a href="${pageContext.request.contextPath}/history">查看历史记录</a>
</body>
</html>
